﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace b7.Models
{
    //[Bind(Exclude = "OrdersId")]
    public class Orders
    {
        [Key]
        public int OrdersId { get; set; }

        [Display(Name = "ten khach hang")]
        public string UserName { get; set; }

        [Display(Name = "trang thai")]
        [Required(ErrorMessage = "nhap trang thai(da thanh toan/chua thnh toan)")]
        public string Status { get; set; }

        [Display(Name = "phuong thuc thanh toan")]
        [Required(ErrorMessage = "hay chon phuong thuc thanh toan")]
        public string PTTT { get; set; }

        [ScaffoldColumn(false)]
        public DateTime CreateDate { get; set; }

        [DisplayFormat(DataFormatString = "{0:HH:mm-dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public DateTime PayDate { get; set; }

        [ScaffoldColumn(false)]
        public decimal Total { get; set; }

        //public virtual Member Member { get; set; }
        public virtual List<OrdersDetail> OrdersDetails { get; set; }
    }
}